package com.nulldev.util.web.nTube;

import com.nulldev.util.data.Variables;
import com.nulldev.util.io.file.FileUtil;
import com.nulldev.util.web.HttpServer3.pages.v3.HttpPage3.CachingMethod;
import com.nulldev.util.web.nTube.extensions.ExtensionResource;
import com.nulldev.util.web.nTube.fun.AprilFoolsResource;
import com.nulldev.util.web.nTube.nPlayer.NPlayerResource;
import com.nulldev.util.web.nTube.resources.NewUIRoot;
import com.nulldev.util.web.nTube.resources.engines.nTubeEngineResource;
import com.nulldev.util.web.nTube.resources.events.nTubeEventResource;
import com.nulldev.util.web.nTube.resources.fa.nTubefuckAdvertisingResource;
import com.nulldev.util.web.nTube.resources.icons.IconsUI;
import com.nulldev.util.web.nTube.resources.icons.specific.qualigain.QualiGainIconResource;
import com.nulldev.util.web.nTube.resources.logos.LogosAssetCore;
import com.nulldev.util.web.nTube.resources.nPlayerNX.nPlayerNXResource;
import com.nulldev.util.web.nTube.resources.ntube_next.NTubeNextResource;
import com.nulldev.util.web.nTube.resources.project_redwood.RedwoodResource;

final class NTubePageLoader {

	private final NTubeServer nst;

	public NTubePageLoader(final NTubeServer inst) {
		this.nst = Variables.requireNonNullObject(inst, "inst");
	}

	/* */

	private void addFileString(final String name, final String file) throws Exception {
		this.nst.addFileString(name, file);
	}

	private void addFileBytes(final String name, final byte[] data) throws Exception {
		this.nst.addFileBytes(name, data);
	}

	private void setPageNotFound(final String content) {
		this.nst.setPageNotFound(content);
	}

	private void setInternalErrorPage(final String content) {
		this.nst.setInternalErrorPage(content);
	}

	private void addDynamicAssetBytes(final String name, final Class<?> reference, final String assetName, final CachingMethod cache) {
		nst.addDynamicAssetBytes(name, reference, assetName, cache);
	}

	private void addDynamicAssetBytes(final String name, final Class<?> reference, final String assetName, final CachingMethod cache,
			final boolean captchaExclusion) {
		nst.addDynamicAssetBytes(name, reference, assetName, cache, captchaExclusion);
	}

	/* */

	public void loadDefaults() throws Exception {
		/* Static Pages */
		addFileString("", FileUtil.getResourceAsString(NTubeServer.class, "ntube_home.html"));
		addFileString("index.html", FileUtil.getResourceAsString(NTubeServer.class, "ntube_home.html"));
		addFileString("music", FileUtil.getResourceAsString(NTubeServer.class, "ntube_music.html"));
		addFileString("video", FileUtil.getResourceAsString(NTubeServer.class, "video.html"));
		addFileString("embed", FileUtil.getResourceAsString(NTubeServer.class, "embed.html"));
		addFileString("watch", FileUtil.getResourceAsString(NTubeServer.class, "video.html"));
		addFileString("about", FileUtil.getResourceAsString(NTubeServer.class, "about.html"));
		addFileString("browser_check", FileUtil.getResourceAsString(NTubeServer.class, "browser_check.html"));
		addFileString("changelog", FileUtil.getResourceAsString(NTubeServer.class, "changelog.html"));
		addFileString("channel", FileUtil.getResourceAsString(NTubeServer.class, "channel.html"));
		addFileString("trending", FileUtil.getResourceAsString(NTubeServer.class, "trending.html"));
		addFileString("search", FileUtil.getResourceAsString(NTubeServer.class, "search.html"));
		addFileString("settings", FileUtil.getResourceAsString(NTubeServer.class, "settings.html"));
		addFileString("frontpage", FileUtil.getResourceAsString(NTubeServer.class, "frontpage.html"));
		addFileString("playlist", FileUtil.getResourceAsString(NTubeServer.class, "playlist.html"));
		addFileString("watchlist", FileUtil.getResourceAsString(NTubeServer.class, "watchlist.html"));
		addFileString("watch_later", FileUtil.getResourceAsString(NTubeServer.class, "watch_later.html"));
		addFileString("shorts", FileUtil.getResourceAsString(NTubeServer.class, "shorts.html"));
		addFileBytes("resources/404", FileUtil.getResourceBytes(NTubeServer.class, "404.html"));
		setPageNotFound(FileUtil.getResourceAsString(NTubeServer.class, "404.html"));
		addFileBytes("resources/503", FileUtil.getResourceBytes(NTubeServer.class, "503.html"));
		setInternalErrorPage(FileUtil.getResourceAsString(NTubeServer.class, "503.html"));
		addDynamicAssetBytes("favicon.ico", NTubeServer.class, "favicon.ico", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/base.js", NewUIRoot.class, "base.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/base_es6_funcs.js", NewUIRoot.class, "base_es6_funcs.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/libWeb.js", NewUIRoot.class, "libWeb.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/settings.js", NewUIRoot.class, "settings.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/filters.js", NewUIRoot.class, "filters.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/crt.png", NewUIRoot.class, "crt.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/promise-queues.js", NewUIRoot.class, "promise-queues.js", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/js-yaml.js", NewUIRoot.class, "js-yaml.js", CachingMethod.LONG_CACHE);

		/* Playback Engines */
		addDynamicAssetBytes("resources/nPlayerNX.js", nPlayerNXResource.class, "nPlayerNX.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/dash.js", nTubeEngineResource.class, "dash.all.min.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/hls.js", nTubeEngineResource.class, "hls.min.js", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/rx-player.min.js", nTubeEngineResource.class, "rx-player.min.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/mpd-parser.wasm", nTubeEngineResource.class, "mpd-parser.wasm", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/rx-player-worker.js", nTubeEngineResource.class, "rx-player-worker.js", CachingMethod.LONG_CACHE);

		/* nTube 1.6 imports */
		addDynamicAssetBytes("resources/ntube-globals.js", NewUIRoot.class, "ntube-globals.js", CachingMethod.EXTREMLY_SHORT_CACHE); // FIXME: Move to
																																		// SHORT_CACHE once
																																		// stable.
		addDynamicAssetBytes("resources/new_ui.js", NewUIRoot.class, "new_ui.js", CachingMethod.EXTREMLY_SHORT_CACHE); // FIXME: Move to SHORT_CACHE once
																														// stable.
		addDynamicAssetBytes("resources/new_ui.css", NewUIRoot.class, "new_ui.css", CachingMethod.EXTREMLY_SHORT_CACHE); // FIXME: Move to SHORT_CACHE once
																															// stable.
		addDynamicAssetBytes("watch_next", NTubeServer.class, "video_next_look.html", CachingMethod.EXTREMLY_SHORT_CACHE); // FIXME: Move to SHORT_CACHE once
																															// stable.
		/* Frontend Icons */
		addDynamicAssetBytes("resources/icons/chapters_icon_dynamic.svg", IconsUI.class, "chapters_icon_dynamic.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/chapters_icon_small.png", IconsUI.class, "chapters_icon_small.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/audio_icon_dynamic.svg", IconsUI.class, "audio_icon_dynamic.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/audio_icon_small.png", IconsUI.class, "audio_icon_small.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/download_icon_small.png", IconsUI.class, "download_icon_small.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/settings_small.png", IconsUI.class, "settings_small.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/description.png", IconsUI.class, "description.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/description.svg", IconsUI.class, "description.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/advanced_stuff.svg", IconsUI.class, "advanced_stuff.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/advanced_stuff.png", IconsUI.class, "advanced_stuff.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/heatmap.png", IconsUI.class, "heatmap.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/heatmap.svg", IconsUI.class, "heatmap.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/playback_settings.svg", IconsUI.class, "playback_settings.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/playback_settings.png", IconsUI.class, "playback_settings.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/account.png", IconsUI.class, "account.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/account.svg", IconsUI.class, "account.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/eye.png", IconsUI.class, "eye.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/eye.svg", IconsUI.class, "eye.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/clock.png", IconsUI.class, "clock.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/clock.svg", IconsUI.class, "clock.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/privacy.png", IconsUI.class, "privacy.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/extraction.png", IconsUI.class, "extraction.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/adb.svg", IconsUI.class, "adb.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/filtering.png", IconsUI.class, "filtering.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/playback.png", IconsUI.class, "playback.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/settings_alt.png", IconsUI.class, "settings_alt.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/collapse.png", IconsUI.class, "collapse.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/expand.png", IconsUI.class, "expand.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/share.svg", IconsUI.class, "share.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/cast.svg", IconsUI.class, "cast.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/locale.svg", IconsUI.class, "locale.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/locale.png", IconsUI.class, "locale.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/settings.svg", IconsUI.class, "settings_updated.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/settings_updated.svg", IconsUI.class, "settings_updated.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/download.png", IconsUI.class, "download.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/download.svg", IconsUI.class, "download.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/home.svg", IconsUI.class, "home_updated.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/trending.svg", IconsUI.class, "trending_updated.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/full_window.svg", IconsUI.class, "full_window_updated.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/icons/music.svg", IconsUI.class, "music_updated.svg", CachingMethod.VERY_LONG_CACHE);
		// Scripts + Third Party Assets
		addDynamicAssetBytes("resources/ntube_next/nTubeNextAPI.js", NTubeNextResource.class, "nTubeNextAPI.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/autocomplete.min.js", NewUIRoot.class, "autocomplete.min.js", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/autocomplete.min.css", NewUIRoot.class, "autocomplete.min.css", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/commander.js", NewUIRoot.class, "commander.js", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/commander.css", NewUIRoot.class, "commander.css", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/superxbr.js", NewUIRoot.class, "superxbr.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/base.css", NewUIRoot.class, "base.css", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/search.css", NewUIRoot.class, "search.css", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/search.js", NewUIRoot.class, "search.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/lang.js", NewUIRoot.class, "lang.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/lore.js", NewUIRoot.class, "lore.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/chart.js", NewUIRoot.class, "chart.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/chart.es5.js", NewUIRoot.class, "chart.es5.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/noise.svg", NewUIRoot.class, "noise.svg", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("ntube_service_worker.js", NewUIRoot.class, "ntube-service-worker.js", CachingMethod.VERY_SHORT_CACHE);
		/* 404 page assets */
		addDynamicAssetBytes("resources/events/2024_404.png", nTubeEventResource.class, "2024_404.png", CachingMethod.VERY_LONG_CACHE);
		/* Legacy Flash Support */
		addDynamicAssetBytes("starkplayer/videoplayer.swf", NewUIRoot.class, "videoplayer.swf", CachingMethod.VERY_LONG_CACHE);
		// RIP oldest page in nTube, updated 25-03-2020, probably around 12-13
		// months after implementation.
		addDynamicAssetBytes("redirect", NTubeServer.class, "redirect.html", CachingMethod.LONG_CACHE);
		/* April Fools */
		addDynamicAssetBytes("fun/2024af.js", AprilFoolsResource.class, "2024af.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("fun/app-bundle.js", AprilFoolsResource.class, "app-bundle.js", CachingMethod.LONG_CACHE);
		/* nTube's birthday */
		addDynamicAssetBytes("resources/events/birthday_hat.png", nTubeEventResource.class, "birthday_hat.png", CachingMethod.VERY_LONG_CACHE);
		/* nTube Christmas */
		addDynamicAssetBytes("resources/events/christmas.png", nTubeEventResource.class, "christmas.png", CachingMethod.VERY_LONG_CACHE);
		/* Project Redwood: Frontend */
		addDynamicAssetBytes("/resources/redwood/botguard.js", RedwoodResource.class, "botguard.js", CachingMethod.SHORT_CACHE);
		addDynamicAssetBytes("/resources/redwood/redwood.js", RedwoodResource.class, "redwood.js", CachingMethod.SHORT_CACHE);
		addDynamicAssetBytes("/resources/redwood/redwood_preprocessor.js", RedwoodResource.class, "redwood-early.js", CachingMethod.SHORT_CACHE);
		addDynamicAssetBytes("/resources/redwood/redwood_drm.js", RedwoodResource.class, "redwood-drm.js", CachingMethod.LONG_CACHE);
		/* nTubeifier */
		addDynamicAssetBytes("/extensions/nTubeifier.user.js", ExtensionResource.class, "nTubeifier.user.js", CachingMethod.SHORT_CACHE);
		/* Service Workers */
		addDynamicAssetBytes("/resources/swbridge.js", NewUIRoot.class, "swbridge.js", CachingMethod.VERY_LONG_CACHE);
		/* PWA manifest */
		addDynamicAssetBytes("manifest.json", NTubeServer.class, "manifest.json", CachingMethod.LONG_CACHE, true);
		/* Branding (manifest assets require captcha exclusion) */
		addDynamicAssetBytes("resources/logos/ntube-logo.svg", NTubeServer.class, "ntube-logo.svg", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-32.png", NTubeServer.class, "ntube-logo-32.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-64.png", NTubeServer.class, "ntube-logo-64.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-96.png", NTubeServer.class, "ntube-logo-96.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-128.png", NTubeServer.class, "ntube-logo-128.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-192.png", NTubeServer.class, "ntube-logo-192.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-256.png", NTubeServer.class, "ntube-logo-256.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/ntube-logo-512.png", NTubeServer.class, "ntube-logo-512.png", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/logos/httpserver_3_0_logo.png", LogosAssetCore.class, "httpserver_3_0_logo.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/logos/nullUtil_3_0_logo_light.png", LogosAssetCore.class, "nullUtil_3_0_logo_light.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/logos/youtube_extractor_2_0_logo.png", LogosAssetCore.class, "youtube_extractor_2_0_logo.png",
				CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/logos/ntube_large.png", LogosAssetCore.class, "ntube_large.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/logos/ntube_small.png", LogosAssetCore.class, "ntube_small.png", CachingMethod.VERY_LONG_CACHE);
		/* Branding: QualiGain */
		addDynamicAssetBytes("/resources/icons/specific/qualigain/qualigain_logo_standard_64px.png", QualiGainIconResource.class,
				"qualigain_logo_standard_64px.png", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("/resources/icons/specific/qualigain/qualigain_logo_standard_128px.png", QualiGainIconResource.class,
				"qualigain_logo_standard_128px.png", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("/resources/icons/specific/qualigain/qualigain_logo_standard_512px.png", QualiGainIconResource.class,
				"qualigain_logo_standard_512px.png", CachingMethod.LONG_CACHE);
		/* Legacy (nTV) */
		addDynamicAssetBytes("/resources/fa/ad_blocked.ts", nTubefuckAdvertisingResource.class, "ad_blocked.ts", CachingMethod.VERY_LONG_CACHE);
		/* Experimental */
		addDynamicAssetBytes("/resources/nplayer_mse/nMuxer.js", NPlayerResource.class, "nMuxer.js", CachingMethod.EXTREMLY_SHORT_CACHE);
	}

	public void loadEmbedded() throws Exception {
		/* Static Pages */
		addFileString("embed", FileUtil.getResourceAsString(NTubeServer.class, "embed.html"));
		addFileBytes("resources/404", FileUtil.getResourceBytes(NTubeServer.class, "404.html"));
		setPageNotFound(FileUtil.getResourceAsString(NTubeServer.class, "404.html"));
		addFileBytes("resources/503", FileUtil.getResourceBytes(NTubeServer.class, "503.html"));
		setInternalErrorPage(FileUtil.getResourceAsString(NTubeServer.class, "503.html"));
		addDynamicAssetBytes("favicon.ico", NTubeServer.class, "favicon.ico", CachingMethod.VERY_LONG_CACHE, true);
		addDynamicAssetBytes("resources/base.js", NewUIRoot.class, "base.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/base_es6_funcs.js", NewUIRoot.class, "base_es6_funcs.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/libWeb.js", NewUIRoot.class, "libWeb.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/settings.js", NewUIRoot.class, "settings.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/filters.js", NewUIRoot.class, "filters.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/nPlayerNX.js", nPlayerNXResource.class, "nPlayerNX.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/crt.png", NewUIRoot.class, "crt.png", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/promise-queues.js", NewUIRoot.class, "promise-queues.js", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/js-yaml.js", NewUIRoot.class, "js-yaml.js", CachingMethod.LONG_CACHE);

		/* Playback Engines */
		addDynamicAssetBytes("resources/dash.js", nTubeEngineResource.class, "dash.all.min.js", CachingMethod.VERY_SHORT_CACHE);
		addDynamicAssetBytes("resources/hls.js", nTubeEngineResource.class, "hls.min.js", CachingMethod.VERY_LONG_CACHE);
		addDynamicAssetBytes("resources/rx-player.min.js", nTubeEngineResource.class, "rx-player.min.js", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/mpd-parser.wasm", nTubeEngineResource.class, "mpd-parser.wasm", CachingMethod.LONG_CACHE);
		addDynamicAssetBytes("resources/rx-player-worker.js", nTubeEngineResource.class, "rx-player-worker.js", CachingMethod.LONG_CACHE);
	}
}
